package com.bgs.eat.commodityOrder.controller;

import com.bgs.eat.commodityOrder.service.CommodityOrderDistributionModeService;
import com.bgs.eat.config.CommonResult;
import lombok.Data;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName commodityOrderDistributionModeController
 * @Description TODO 配送方式
 * @Author G胖
 * @Date 2022-11-01 下午 07:34
 **/

@RestController
@CrossOrigin
@RequestMapping("/commodityOrderDistributionMode")
public class CommodityOrderDistributionModeController {

    @Resource
    CommodityOrderDistributionModeService commodityOrderDistributionModeService;

    /**
    * @Author gpd
    * @Description  查询对应的配送方式
    * @Date 2022-11-01 下午 07:40
    * @Return com.bgs.eat.config.CommonResult

    */
    @GetMapping("/getOrderDistributionMode")
    public CommonResult getOrderDistributionMode(Integer id){
        return CommonResult.ok(commodityOrderDistributionModeService.getOrderDistributionMode(id));
    }
}
